#define _USE_MATH_DEFINES
#include <math.h>
#include "gtest/gtest.h"
#include "prime.h"



TEST(prime,test1) {
    EXPECT_EQ(true,checkprime(5));
}

TEST(prime,test2) {
    EXPECT_NE(true,checkprime(4));
}

TEST(prime,test3) {
    EXPECT_EQ(5,trunc_left(85));
}

TEST(prime,test4) {
    EXPECT_EQ(43200,trunc_left(843200));
}



TEST(prime,test5) {
    EXPECT_EQ(8,trunc_right(85));
}

TEST(prime,test6) {
    EXPECT_EQ(84320,trunc_right(843200));
}

TEST(prime,test7) {
    EXPECT_EQ(false,check_truncatable_prime(443));
}


int main(int argc, char **argv) {
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}
